<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />		
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />	
		<title>倍数游戏辅助器</title>
	</head>
	<body>
		<input type="text" id="txt" placeholder="请输入倍数">
		<button onclick="a()">开始</button>
		
		<script>
			function a(){
				// document文档 get获取 Element元素 By通过 Id
				// value值 Math数学 Math.floor()向下取整
				var n = document.getElementById("txt").value;
				// i % n == 0  n的倍数
				// i % 10 == n 个位数上是n
				// Math.floor(i / 10) == n 十位数上是n
				for(var i = 1; i < 100; i++){
					if(i % n == 0 || i % 10 == n || Math.floor(i / 10) == n){
						alert("拍手");
					} else {
						alert(i);
					}
				}
			}
		</script>
	</body>
</html>
